import 'package:flutter_enjoy_plus/constants/index.dart';
import 'package:flutter_enjoy_plus/utils/RequestDio.dart';

// 获取房屋列表
Future<dynamic> getHouseListAPI() => requestDio.get(HTTP_PATH.HOUSE_LIST);
// 获取地址信息
Future<dynamic> getAddressInfoAPI(double longitude, double latitude) =>
    requestDio.gaode_reverse(
        '${GlobalVariable.GAODE_BASE_URL}${HTTP_PATH.GAODE_REVERSE}',
        params: {
          'key': '6e42050793304b24ac2e39cb1bbe8154',
          'location': '$longitude,$latitude',
        });
// 周边信息
Future<dynamic> getAroundAddressInfoAPI(double longitude, double latitude) =>
    requestDio.gaode_reverse(
        '${GlobalVariable.GAODE_BASE_URL}${HTTP_PATH.AROUND}',
        params: {
          'key': '6e42050793304b24ac2e39cb1bbe8154',
          'location': '$longitude,$latitude',
          "keywords": "公司",
          "radius": 500, // 搜索半径
          "offset": 10 // 就查10条
        });
